package org.jeecg.modules.project.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.interview.entity.Interview;
import org.jeecg.modules.project.entity.Project;
import org.jeecg.modules.project.mapper.ProjectMapper;
import org.jeecg.modules.project.service.ProjectService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.InputStream;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liujiamiao
 * @since 2020-11-04
 */
@Service
public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> implements ProjectService {

    /**
     * 分页查询
     * @param page
     * @param limit
     * @return
     */
    @Override
    public IPage<Project> pageSelect(Integer page, Integer limit,Integer basicId) {
        Page<Project> pageSelect = new Page<>(page,limit);

        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("basic_id",basicId);

        IPage<Project> projectIPage = this.page(pageSelect,wrapper);

        return projectIPage;
    }

    /**
     * 保存或者更新项目
     * @param project
     */
    @Override
    public void saveOrUpdateEntity(Project project) {
        UpdateWrapper wrapper = new UpdateWrapper();
    }

}
